Java. Io. charconversionexception: Not an ISO 8859-1 character: XXX
This problem may be caused by text output from outputstream.
Response. setcontenttype ("Text/html; charsets = UTF-8");//Response. getoutputstream (). Print ("text ");//This line of errorResponse. getwriter (). Print ("Text");//Just replace it with this.Response. getwriter (). Close ();
Java. Io. charconversionexception:Not an ISO 8859-1 character: XXX
This problem may be caused by text output from outputstream.
Response. setcontenttype ("text/html; charset = UTF-8 ");// Response. getoutputstream (). Print ("中文""); // This row has an errorResponse. getwriter (). Print ("text"); // replace it with this.Response. getwriter (). Close ();
I personally think it is because outputstream outputs
Java (java io-File class), io-1. In the entire io package, the only class that indicates the File itself is the File class. You can use the File class to create or delete files. To use the File class, first observe the construction method of the File class. The common constr
20.1 Java New IO Introduction20.2 Buffers with BufferExample: demonstrating the operation flow of buffersClass:intbufferdemo0120.2.2 Deep buffer operation20.2.3 Creating a sub-buffer20.2.4 creating a read-only buffer20.2.5 Creating a direct buffer20.3 Channels20.3.1 FileChannelExample: Using output channels to output contentClass:filechanneldemo01Example: Using a channel for read and write operationsClass:f
, write-only; RW, read/write3) You can directly jump to the specified position in the file.4. An example of an I/O ApplicationImport java. Io .*;Public class testio {Public static void main (string [] ARGs)Throws ioexception {// 1. read data from a file in behavior unitsBufferedreader in =New bufferedreader (New filereader ("F: // nepalon // testio. Java "));Stri
Java (4) -- IO stream, java -- io stream(1) Java Stream Input/Output Principle:
In a Java program, input/output operations on data are performed in the stream mode to obtain different types of data. The program inputs or outputs
Java programming --- io stream reads the file content and outputs its inverse value to the console, java --- io
Import java. io. BufferedReader;Import java.
Java io stream learning and Java io stream
I have carefully studied Java I/O streams in recent days. I was planning to watch videos and learn through videos. However, I found that videos are not easy to understand, so I learned the Java
Java asynchronous IO and java asynchronous io
The key points of the new asynchronous functions are some subsets of the Channel class. The Channel needs to be switched to a background process when processing IO operations. You can use this function to access large, time-consu
Java-IO basic class memories and java-io basic memories
For Java I/O, I have already learned this basic category in college, but I forgot about it. So I am going to write a blog, let's take a look at all these things and sort them out.
First, use a picture on the Internet:
V
Java IO stream, java IO stream character
Refer stream: it also reads binary files, which will be decoded into characters that we can understand.Bytes stream = byte stream + Decoding(1) character input stream: Reader: It is the root class of the character input stream and is an abstract class.
FileReader: file character
Java BASICS (20) IO streams (3) and java basics io streams
Here are some of the knowledge points and code I summarized in my previous class. Most of the notes I think are very good and classic, sincerely hope that these will help those who want to learn!
It is inconvenient to upload code by module. There are also many
Java basics [12] java. io. file (folder) creation, javajava. io. file
Using java. io. file to create a file (folder) is the most basic knowledge of java.
Jdk api description:
You can s
Java BASICS (18) IO streams (1), java basics io streams
Here are some of the knowledge points and code I summarized in my previous class. Most of the notes I think are very good and classic, sincerely hope that these will help those who want to learn!
It is inconvenient to upload code by module. There are also many thi
Java IO systems and Java IO SystemsDifferences
One is the input/output stream system and the other is the reader/writer system. The difference between the two systems is:
Stream is responsible for byte stream data, and reader/writer is responsible for bytes stream.
Design Mode: decorator Mode
This mode is mainly used t
Java learning notes-10. io stream, java learning notes-10.io
1. The input stream can only read data from it, but cannot write data to it. The output stream can only read bytes of data.
2. The InputStream types include:
ByteArrayInputStream contains a memory buffer, which is extracted from byte. FileInputStream obtain
Java-IO streams, Java IO stream characters
Java text (char) is a 16-bit unsigned integer and unicode (dubyte encoding) of characters ).
The file is a data sequence of byte.
A text file is a storage result of serialized text (char) sequences into bytes according to a certain
[] args)throwsunsupportedencodingexception {Try { //1. Declaring an input streamFileInputStream fis=NewFileInputStream ("D:/test/s1.txt"); //2. redirectionsystem.setin (FIS); //3. Read the contents of the system.in standard input streamBufferedReader br=NewBufferedReader (NewInputStreamReader (system.in, "gb2312"));//Set character encoding//4. Output the contents of the system.inString line=NULL; while((Line=br.readline ())! =NULL) {System.out.println (line); } //5. Close
Java. io. Reader and java. io. InputStream constitute Java input classes. Reader is used to read 16 characters, that is, Unicode-encoded characters. InputStream is used to readInput ASCII characters and binary data.In Java, differ
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.